using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using SailHero.Soft.FrameWork.Models;

namespace SailHero.Soft.FrameWork.Mapping.HJT212DB
{
    public class Sys_LogMap : EntityTypeConfiguration<Sys_Log>
    {
        public Sys_LogMap()
        {
            // Primary Key
            this.HasKey(t => t.LogID);

            // Properties
            this.Property(t => t.UserID)
                .HasMaxLength(50);

            this.Property(t => t.LogContent)
                .HasMaxLength(500);

            this.Property(t => t.URL)
                .HasMaxLength(100);

            this.Property(t => t.Remark)
                .HasMaxLength(100);

            // Table & Column Mappings
            this.ToTable("Sys_Log");
            this.Property(t => t.LogID).HasColumnName("LogID");
            this.Property(t => t.UserID).HasColumnName("UserID");
            this.Property(t => t.LogContent).HasColumnName("LogContent");
            this.Property(t => t.URL).HasColumnName("URL");
            this.Property(t => t.Remark).HasColumnName("Remark");
            this.Property(t => t.LogDate).HasColumnName("LogDate");
        }
    }
}
